package com.baidu.web;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.baidu.dao.IUserDAO;
import com.baidu.entity.User;

@Controller
@RequestMapping("/user")
public class UserController {

	public static Logger logger=LoggerFactory.getLogger(UserController.class);
	
	@Autowired
	IUserDAO userDAO;
	
	@RequestMapping("/list")
	public String list(Map<String,Object> model){
		List<User> list=userDAO.findAll();
		logger.debug("execute list!");
		model.put("list", list);
		return "user/list";
	}
}
